<?php
	if (isset($_POST['username'],$_POST['userpass'],$_POST['verifpass'],$_POST['usermail'],$_POST['bday'],$_POST['bmonth'],$_POST['byear'])){
		if (!empty($_POST['username']) && !empty($_POST['userpass']) && !empty($_POST['verifpass']) && !empty($_POST['usermail']) && !empty($_POST['bday']) && !empty($_POST['bmonth']) && !empty($_POST['byear'])){
			if ($_POST['userpass'] == $_POST['verifpass']){
				createUser($_POST['username'],$_POST['userpass'],$_POST['usermail'],$_POST['byear'].'-'.$_POST['bmonth'].'-'.$_POST['bday']);
			} else {
				echo 'Il semblerait que vos mots de passe ne concordent pas...';
			}
		} else {
			echo 'TOUS les champs sont obligatoires !';
		}
	} else {
		echo 'Une erreur est survenue';
	}
?>